#ifndef __NOCOPYABLE_H_
#define __NOCOPYABLE_H_

namespace tb
{

class nocopyable
{
#if(__cplusplus == 201103L)     // c++11
protected:
    nocopyable() = default;
    ~nocopyable() = default;
private:
    nocopyable(const nocopyable&) = delete;
    nocopyable& operator=(const nocopyable&) = delete;
#else           // c++98
protected:
    nocopyable()  {}
    ~nocopyable() {}
private:
    nocopyable(const nocopyable&);
    nocopyable& operator=(const nocopyable&);
#endif
};

}

#endif
